<template>
	<el-drawer title="证照详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="排序号" prop="sortNo">{{form.sortNo}}</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="证照名称" prop="name">{{form.name}}</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="关联人员" prop="userId">{{form.userName}}</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="证照编号" prop="licenceCode">{{form.licenceCode}}</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="发证机构" prop="notifiedBody">{{form.notifiedBody}}</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="证照类型" prop="licenceType">{{form.licenceTypeName}}</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="生效日期" prop="beginTime">{{form.beginTime}}</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="截止日期" prop="endTime">{{form.endTime}}</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="证照备注">{{form.remark}}</el-form-item>
					<el-form-item label="证照附件" v-if="form.attachId!=''">
						<attach-menu :attachIds="form.attachId" :roleFlag="3" :preview="true" ></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				licenceId: '',
				sortNo: '',
				name: '',
				userName: '',
				licenceCode: '',
				notifiedBody: '',
				licenceTypeName: "",
				beginTime: '',
				endTime: '',
				attachId: '',
				remark: ''
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.licenceId = data.licenceId
			this.form.sortNo = data.sortNo
			this.form.name = data.name
			this.form.userName = data.userName
			this.form.licenceCode = data.licenceCode
			this.form.notifiedBody = data.notifiedBody
			this.form.licenceTypeName = data.licenceTypeName
			this.form.beginTime = data.beginTime
			this.form.endTime = data.endTime
			this.form.attachId = data.attachId
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
